#include <linux/mm.h>

unsigned long HIGH_MEMORY = 0;
unsigned char mem_map [ PAGING_PAGES ] = {0,};

void mem_init(long start_mem, long end_mem)
{
	int i;

	HIGH_MEMORY = end_mem;
	for (i=0 ; i<PAGING_PAGES ; i++)
		mem_map[i] = USED; /* 主内存地址区域之前的页都标明为使用状态 */
	i = MAP_NR(start_mem); /* 计算主内存起始地址所在的页号 */
	end_mem -= start_mem;
	end_mem >>= 12; /* 计算主内存区域由多少个页 */
	while (end_mem-->0)
		mem_map[i++]=0;	/* 主内存区域的页标记为未使用状态 */
}